import Vue from "vue";
import VueRouter from "vue-router";

const Index = () => import("../views/Home/index.vue");
const Recommend = () => import("../views/Home/Recommend/index.vue");
const Rank = () => import("../views/Rank");
const Songer = () => import("../views/Songer");
const SheetList = () => import("../views/sheetList");
const MusicVideo = () => import('../views/MusicVideo')

const MusicList = () => import('../views/musicList')

const MusicDetail = () => import('../views/musicDetail')
Vue.use(VueRouter);

const routes = [
    { path: "/", redirect: "/index" },
    {
        path: "/index",
        name: 'Index',
        component: Index,
        redirect: "/recommend",
    },
    {
        path: "/rank",
        name: 'Rank',
        component: Rank,
    },
    {
        path: "/recommend",
        name: "Recommend",
        component: Recommend,
        // children: [
        //     {
        //         path: 'musicList',
        //         name: 'MusicList',
        //         component: MusicList
        //     }
        // ]
    },
    {
        path: "/sheetList",
        name: 'SheetList',
        component: SheetList,
    },
    {
        path: "/songer",
        name: 'Songer',
        component: Songer,
    },
    {
        path: "/mv",
        name: 'Mv',
        component: MusicVideo,
    },
    {
        path: '/musicList',
        name: 'MusicList',
        component: MusicList
    },
    {
        path: '/musicDetail',
        name: 'MusicDetail',
        component: MusicDetail
    }

];

const router = new VueRouter({
    mode: "history",
    routes,
});

export default router;
